package cn.gok.springbootlearning.entity;

import cn.gok.springbootlearning.anno.Colum;
import cn.gok.springbootlearning.anno.Entity;
import cn.gok.springbootlearning.base.entity.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.stereotype.Component;

import javax.persistence.Id;

/**
 * @ClassName Student
 * @Description TODO
 * @Author HP
 * @Date 14:09 2022/7/26
 * @Version 1.0
 **/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Component
@javax.persistence.Entity
@Entity(tableName = "t_student")
public class Student extends BaseEntity{
    @Id
    public Integer id;

    @Colum(cname = "s_name",nonable = false)
    public String name;
    @Colum(cname = "s_age" )
    public Integer age;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }
}
